-
Notifications
You must be signed in to change notification settings - Fork 7
UIREQ-1314: Display Anonymized Requesters in the Request List #1337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
|
||
| ## 13.0.0 IN PROGRESS | ||
|
|
||
| * Display Anonymized when searching requests. Refs UIREQ-1312. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to move it down to visualize that it was made last in this release (after * When creating or viewing a request, show whether the a loan on the item would be use-at-location. Fixes UIREQ-1327.).
| }, | ||
| }; | ||
|
|
||
| function userFormatter(id, user) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Could you please move it to to src/utils.js for reuse in all places?
- As I understand it, we only need to show anonymized when the user id is null. Could you add a function to src/utils.js, for example:
export const isAnonymizedUser = (id) => {
return id === null;
};
and use it in this function.
Just for example:
if (user) {
return getFullName(user);
}
if (isAnonymizedUser(id)) {
return <FormattedMessage id="ui-requests.requestMeta.anonymized" />;
}
return <NoValue />;
With this approach it will be clearer what is happening. We correctly check that id === null and it will be clear why we are doing this.
| }, | ||
| }; | ||
|
|
||
| function userFormatter(id, user) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please take a look on comment above for userFormatter?
| 'itemBarcode': rq => (rq?.item?.barcode || <NoValue />), | ||
| 'position': rq => (rq.position || <NoValue />), | ||
| 'proxy': rq => (rq.proxy ? getFullName(rq.proxy) : <NoValue />), | ||
| 'proxy': rq => userFormatter(rq.proxyUserId, rq.proxy), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://folio-org.atlassian.net/browse/UXPROD-4302
And, if they exist, the proxy.lastName, proxy.firstName, proxy.barcode, and proxyUserId are removed from the request record
In story we do not have clear scenarios and difficult to understand correct behavior for current case.
How i understood if a requester has been anonymized then the requesterId and proxyUserId will be null.
Could you please double check do we need we show anonymized for proxy or NoValue?
| 'itemBarcode': rq => (rq?.item?.barcode || <NoValue />), | ||
| 'position': rq => (rq.position || <NoValue />), | ||
| ...(isProxyAvailable ? { 'proxy': rq => (rq.proxy ? getFullName(rq.proxy) : <NoValue />) } : {}), | ||
| ...(isProxyAvailable ? { 'proxy': rq => userFormatter(rq.proxyUserId, rq.proxy) } : {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please take a look on comment above for 'proxy'?
|
Hello. @brycekbargar Thank you for your pull request. We left several comment on them. Could you please take a look on them when you will have time? |
|
Hello. @folio-org/fe-tl-reviewers Could you please take a look when you will have time? |
|
Duplicate for #1348 |


Purpose
#1330 Displayed individual requesters/proxies as anonymized. This applies the same logic to requesters/proxies that appear in the list.
Approach
This follows the same logic as displaying a single anonymized user vs deleted user based on whether the requestId is present.
Refs
https://folio-org.atlassian.net/browse/UIREQ-1314
Screenshots
Pre-Merge Checklist
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.
Notes:
Origin pull request was #1334 but we was not able run Sonar for fork and we created current pull.